Integrand size = 24, antiderivative size = 48 \[ \int \frac {\sec ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=-\frac {\text {arctanh}(\sin (c+d x))}{a^2 d}+\frac {2 i \sec (c+d x)}{d \left (a^2+i a^2 \tan (c+d x)\right )} \]
[Out]
Time = 0.06 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3581, 3855} \[ \int \frac {\sec ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=-\frac {\text {arctanh}(\sin (c+d x))}{a^2 d}+\frac {2 i \sec (c+d x)}{d \left (a^2+i a^2 \tan (c+d x)\right )} \]
[In]
[Out]
Rule 3581
Rule 3855
Rubi steps \begin{align*} \text {integral}& = \frac {2 i \sec (c+d x)}{d \left (a^2+i a^2 \tan (c+d x)\right )}-\frac {\int \sec (c+d x) \, dx}{a^2} \\ & = -\frac {\text {arctanh}(\sin (c+d x))}{a^2 d}+\frac {2 i \sec (c+d x)}{d \left (a^2+i a^2 \tan (c+d x)\right )} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(184\) vs. \(2(48)=96\).
Time = 0.44 (sec) , antiderivative size = 184, normalized size of antiderivative = 3.83 \[ \int \frac {\sec ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=-\frac {\sec ^2(c+d x) \left (\cos \left (\frac {1}{2} (c+d x)\right ) \left (2 i+\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+\left (2+i \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-i \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right ) \sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {3}{2} (c+d x)\right )+i \sin \left (\frac {3}{2} (c+d x)\right )\right )}{a^2 d (-i+\tan (c+d x))^2} \]
[In]
[Out]
Time = 0.73 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.12
method | result | size |
derivativedivides | \(\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\frac {4}{-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2} d}\) | \(54\) |
default | \(\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\frac {4}{-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2} d}\) | \(54\) |
risch | \(\frac {2 i {\mathrm e}^{-i \left (d x +c \right )}}{a^{2} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{a^{2} d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{a^{2} d}\) | \(61\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.33 \[ \int \frac {\sec ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=-\frac {{\left (e^{\left (i \, d x + i \, c\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - e^{\left (i \, d x + i \, c\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right ) - 2 i\right )} e^{\left (-i \, d x - i \, c\right )}}{a^{2} d} \]
[In]
[Out]
\[ \int \frac {\sec ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=- \frac {\int \frac {\sec ^{3}{\left (c + d x \right )}}{\tan ^{2}{\left (c + d x \right )} - 2 i \tan {\left (c + d x \right )} - 1}\, dx}{a^{2}} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 117 vs. \(2 (44) = 88\).
Time = 0.56 (sec) , antiderivative size = 117, normalized size of antiderivative = 2.44 \[ \int \frac {\sec ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=-\frac {-2 i \, \arctan \left (\cos \left (d x + c\right ), \sin \left (d x + c\right ) + 1\right ) - 2 i \, \arctan \left (\cos \left (d x + c\right ), -\sin \left (d x + c\right ) + 1\right ) - 4 i \, \cos \left (d x + c\right ) + \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + 2 \, \sin \left (d x + c\right ) + 1\right ) - \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right ) + 1\right ) - 4 \, \sin \left (d x + c\right )}{2 \, a^{2} d} \]
[In]
[Out]
none
Time = 0.42 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.19 \[ \int \frac {\sec ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=-\frac {\frac {\log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{2}} - \frac {\log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a^{2}} - \frac {4}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}}}{d} \]
[In]
[Out]
Time = 4.06 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.92 \[ \int \frac {\sec ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=-\frac {2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}+\frac {4{}\mathrm {i}}{a^2\,d\,\left (1+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )} \]
[In]
[Out]